<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ include file="/common/taglibs.jsp"%>
<div class="t_bar">
	<span class="color_red">*</span>
	项目基本情况
</div>
<table class="table01 t_css" width="100%" border="0" cellpadding="0" id="basic_info"
	cellspacing="1">
	<col style="width: 20%" />
	<col style="width: 30%" />
	<col style="width: 20%" />
	<col style="width: 30%" />
	<!-- <tr class="li_2">
		<td colspan="4" align="center">在皖转化科技成果情况</td>
	</tr> -->
	<tr class="li_2">
		<td align="right" width="20%">
			<span class="color_red">*</span>
			项目名称：
		</td>
		<td colspan="3">
			<x:out select="$xmlData/data/proposal/zh_title_sub" />
		</td>
	</tr>
	<tr class="li_2">
		<td align="right" width="20%">归口管理部门：</td>
		<td>
			<x:out select="$xmlData/data/proposal/recomend_org_name" />
		</td>
		<td align="right" width="20%">申报时间：</td>
		<td>
			<x:out select="$xmlData/data/proposal/submit_date" />
		</td>
	</tr>
	<tr>
		<c:set var='unit_type3'>，<x:out
							select="$xmlData/data/proposal/unit_type3_value" />，</c:set>
		<td align="right">
			单位类型：
		</td>
		<td colspan="3">
			<c:if test="${fn:contains(unit_type3, '，01，')}">■中央驻皖高校&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</c:if>
			<c:if test="${not fn:contains(unit_type3, '，01，')}">□中央驻皖高校&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</c:if>
			<c:if test="${fn:contains(unit_type3, '，02，')}">■省属高校&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</c:if>
			<c:if test="${not fn:contains(unit_type3, '，02，')}">□省属高校&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</c:if>
			<c:if test="${fn:contains(unit_type3, '，03，')}">■中央驻皖科研院所 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</c:if>
			<c:if test="${not fn:contains(unit_type3, '，03，')}">□中央驻皖科研院所 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</c:if>
			<c:if test="${fn:contains(unit_type3, '，04，')}">■省属科研院所&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</c:if>
			<c:if test="${not fn:contains(unit_type3, '，04，')}">□省属科研院所&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</c:if>
			<c:if test="${fn:contains(unit_type3, '，05，')}">■其他&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</c:if>
			<c:if test="${not fn:contains(unit_type3, '，05，')}">□其他&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</c:if>					
		</td>
	</tr>
	
	<tr class="li_2">
		<td align="right">
			<span class="color_red">*</span>
			项目联系人姓名：
		</td>
		<td>
			<x:out select="$xmlData/data/proposal/contact_psn_cname" />
		</td>
		<td align="right">
			<span class="color_red">*</span>
			联系人手机：
		</td>
		<td>
			<x:out select="$xmlData/data/proposal/contact_psn_mobile" />
		</td>
	</tr>
	<tr class="li_2">
		<td align="right">
			<span class="color_red">*</span>
			项目报审级次（省补助资金拨付所属财政局）：
		</td>
		<td>
			<x:out select="$xmlData/data/proposal/sub_step_name"/>
		</td>
		<td align="right">
			<span class="color_red">*</span>
			申请补助金额（万元）：
		</td>
		<td>
			<x:out select="$xmlData/data/budgets/project_apply_money" />
		</td>
	</tr>
	<tr class="li_2">

		<td rowspan="2">在皖转化并于 ${statYear-1}年实际到账的全部技术成果(项/万元)：</td>
		<td align="right">项目数（项）：</td>

		<td colspan="2">
			<x:out select="$xmlData/data/proposal/achieve_num" />
		</td>
	</tr>
	<tr class="li_2">

		<td align="right">实际到账金额（万元）：</td>

		<td colspan="2">
			<x:out select="$xmlData/data/proposal/actural_money" />
		</td>
	</tr>
	<tr class="li_2">

		<td rowspan="3">省补助经费用途：</td>

		<td colspan="3" rowspan="3">
			<c:set var="user_way"><x:out select="$xmlData/data/proposal/help_use_way" /></c:set>
			<textarea style="width: 725px;height:100px;background-color:white;border:none" disabled="disabled">${user_way }</textarea>
		</td>
	</tr>
</table>


<table  id="zh_persons" border="0" cellspacing="0" cellpadding="0" class="table01" >
		<thead>
			<tr>
                <th width="3%">序号</th>
				<th width="11%">技术合同项目名称</th>
				<th width="9%">合同起止日期</th>
				<th width="8%">技术合同网上登记号</th>
				<th width="8%">买方企业名称</th>
				<th width="8%">买方所在市</th>
				<th width="10%">其中：<x:out select="$xmlData/data/proposal/year_se" />年实际到账金额（以开据发票为准,单位/万元）</th>
				<!-- <th width="8%">技术合同交易类别</th>
				<th width="8%">技术合同总金额（万元）</th>
				<th width="8%">实际到账总金额（万元）</th>
				<th width="8%">拉动企业研发投入（万元）</th>
				<th width="8%">预计带动企业新增产值（万元）</th> -->
			</tr>
		</thead>
		<tbody id="tab">
			<tr style="display: none">
				<td align="center">
					<span name="achevies|achevie[0]@seq_no">[index]</span>
					<input type="hidden" name="achevies|achevie[0]|award_person_num1" /> 
					<input type="hidden" name="achevies|achevie[0]|award_money" />
					<input type="hidden" name="achevies|achevie[0]|award_person_num2" />
					<input type="hidden" name="achevies|achevie[0]|award_stock" />
					<input type="hidden" name="achevies|achevie[0]|change_result" />
				</td>
				<td align="center">
					<span name="achevies|achevie[0]|project_name"></span>
				</td>
				<td align="center">
					<span name="achevies|achevie[0]|project_start_date"></span>~
					<span name="achevies|achevie[0]|project_end_date"></span>
				</td>
				<td align="center">
					<span name="achevies|achevie[0]|project_code"></span>
				</td>
				<td align="center">
					<span name="achevies|achevie[0]|buyer_name"></span>
				</td>
				<td align="center">
					<span name="achevies|achevie[0]|buyer_city"></span>
				</td>
				<td align="center">
					<span name="achevies|achevie[0]|actural2_sum" ></span>
				</td>
				<td align="center" style="display: none">
					<span name="achevies|achevie[0]|trade_type"></span>
				</td>
				<td align="center" style="display: none">
					<span name="achevies|achevie[0]|project_sum" ></span>
				</td>
				<td align="center" style="display: none">
					<span name="achevies|achevie[0]|actural_sum" ></span>
				</td>
				<td align="center" style="display: none">
					<span  name="achevies|achevie[0]|comp_inverst" ></span>
				</td>
				<td align="center" style="display: none">
					<span  name="achevies|achevie[0]|comp_profit" ></span>
				</td>
			</tr>
			<c:set value="0" var="index" scope="page" />
			<x:forEach select="$xmlData/data/achevies/achevie" var="achevie">
				<c:choose>
					<c:when test="${index<10}">
						<c:set value="0" var="flag" scope="page" />
					</c:when>
					<c:otherwise>
						<c:set value="" var="flag" scope="page" />
					</c:otherwise>
				</c:choose>
				<tr>
					<td align="center">
						<span name="achevies/achevie[${flag}${index}]@seq_no">${index+1}</span>
						<input type="hidden" name="achevies/achevie[${flag}${index}]/award_person_num1" value="<x:out select="$achevie/award_person_num1" />"/>
						<input type="hidden" name="achevies/achevie[${flag}${index}]/award_money" value="<x:out select="$achevie/award_money" />"/>
						<input type="hidden" name="achevies/achevie[${flag}${index}]/award_person_num2" value="<x:out select="$achevie/award_person_num2" />"/>
						<input type="hidden" name="achevies/achevie[${flag}${index}]/award_stock" value="<x:out select="$achevie/award_stock" />"/>
						<input type="hidden" name="achevies/achevie[${flag}${index}]/change_result" value="<x:out select="$achevie/change_result" />"/>
					</td>
					<td align="left">
						<span name="achevies/achevie[${flag}${index}]/project_name"><x:out select="$achevie/project_name" /></span>
					</td>
					<td align="left">
						<span name="achevies/achevie[${flag}${index}]/project_start_date"><x:out select="$achevie/project_start_date" /></span>~
						<span name="achevies/achevie[${flag}${index}]/project_end_date"><x:out select="$achevie/project_end_date" /></span>
					</td>
					<td align="left">					
						<span name="achevies/achevie[${flag}${index}]/project_code"><x:out select="$achevie/project_code" /></span>
					</td>
					<td align="left">
						<span name="achevies/achevie[${flag}${index}]/buyer_name"><x:out select="$achevie/buyer_name" /></span>
					</td>
					<td align="left"> 
						<span name="achevies/achevie[${flag}${index}]/buyer_city"><x:out select="$achevie/buyer_city" /></span>
					</td>
					<td align="center">
						<span name="achevies/achevie[${flag}${index}]/actural2_sum"><x:out select="$achevie/actural2_sum" /></span>
					</td>
					<td align="left" style="display: none">
						<span name="achevies/achevie[${flag}${index}]/trade_type"><x:out select="$achevie/trade_type" /></span>
					</td>
					<td align="center" style="display: none">
						<span name="achevies/achevie[${flag}${index}]/project_sum"><x:out select="$achevie/project_sum" /></span>
					</td>
					<td align="center" style="display: none">
						<span name="achevies/achevie[${flag}${index}]/actural_sum"><x:out select="$achevie/actural_sum" /></span>
					</td>
					<td align="center" style="display: none">
						<span name="achevies/achevie[${flag}${index}]/comp_inverst"><x:out select="$achevie/comp_inverst" /></span>
					</td>
					<td align="center" style="display: none">
						<span name="achevies/achevie[${flag}${index}]/comp_profit"><x:out select="$achevie/comp_profit" /></span>
					</td>
				</tr>
				<c:set value="${index+1}" var="index" scope="page" />
			</x:forEach>
			</tbody>
	</table>
	<table border="0" cellspacing="0" cellpadding="0" class="table01" >
		<col style="width: 82%" />
		<col style="width: 18%" />
		<tr>
			<td align="right">
				合计（万元）：
			</td>
			<td align="center">
				<x:out select="$xmlData/data/proposal/actural_daozhang_money"/>
			</td>	
		</tr>
	</table>
<br>


<script type="text/javascript">
	$(function() {
		
		$("#basic_info").each(function(){
			$(this).find("tr:even").removeClass("li_1").removeClass("li_2").addClass("li_1");
			$(this).find("tr:odd").removeClass("li_1").removeClass("li_2").addClass("li_2");
		});

		
		/* $("#tblAchieve tr:even").addClass("li_1");
		$("#tblAchieve tr:odd").addClass("li_2"); */
		var applyMoney = $("#applyMoney").val();
		var actural_money = $("#actural_money").val();
		if (!!!applyMoney && !!!applyMoney) {
			$("#applyMoney").val("0.00");
			$("#actural_money").val("0.00");
		}
		formatNumberAuto(parseFloat($("#actural_money"))+".0000", 7, 4, 2)
	});

	function calGoodSum() {
		var good_sum = 0.00;
		$("#tblAchieve input[name$=actural_goods]:gt(0)").each(function() {
				good_sum += parseFloat($(this).val());
		})
		$("#good_sum").val(formatNumberAuto(parseFloat(good_sum)+".0000", 7, 4, 2));
	}
</script>
